import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/index.vue')
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/index.vue')
    },
    // 关注路由
    {
      path: '/follow ',
      name: 'follow',
      component: () => import('../views/follow.vue')
    },
	// 发现路由
	{
	  path: '/discovery',
	  name: 'discovery',
	  component: () => import('../views/discovery.vue'),
	  children:[
	  		  {
	  		    path: '/detail',
	  		    name: 'detail',
	  		    component: () => import('../components/zjy/detail.vue')
	  		  },
			  {
			    path: '/show_type',
			    name: 'show_type',
			    component: () => import('../components/zjy/show_type.vue')
			  },
			]
	},
	{
		path: '/detail',
		name: 'detail',
		component: () => import('../components/zjy/detail.vue')
	},
	// 大赛路由
	{
	  path: '/activities',
	  name: 'activities',
	  component: () => import('../views/activities.vue'),
	  children:[
	  		  {
	  		    path: '/dasai3',
	  		    name: 'dasai3',
	  		    component: () => import('../components/zjy/dasai3.vue')
	  		  },
			  {
			    path: '/dasai4',
			    name: 'dasai4',
			    component: () => import('../components/zjy/dasai4.vue')
			  },
			  {
			    path: '/dasai5',
			    name: 'dasai5',
			    component: () => import('../components/zjy/dasai5.vue')
			  },
	  ]
	},
	// 素材路由
	// {
	//   path: '/materials',
	//   name: 'materials',
	//   component: () => import('../views/materials.vue')
	// },
	// 搜索路由
	// {
	//   path: '/search',
	//   name: 'search',
	//   component: () => import('../views/search.vue')
	// },
	// 上传路由
	// {
	//   path: '/upload',
	//   name: 'upload',
	//   component: () => import('../views/upload.vue')
	// },
	// 用户路由
	// {
	//   path: '/user',
	//   name: 'user',
	//   component: () => import('../views/user.vue')
	// },
	// 登录路由
	{
	  path: '/login',
	  name: 'login',
	  component: () => import('../views/login.vue')
	},
	// 注册路由
	// {
	//   path: '/register',
	//   name: 'register',
	//   component: () => import('../views/register.vue')
	// },
	// 我的主页路由
	// {
	//   path: '/userinfo',
	//   name: 'userinfo',
	//   component: () => import('../views/userinfo.vue')
	// },
	// 我个人信息修改路由
	// {
	//   path: '/setting',
	//   name: 'setting',
	//   component: () => import('../views/setting.vue')
	// },
	
	// 后台路由
	{
	  path: '/admin',
	  name: 'admin',
	  component: () => import('../views/admin.vue'),
	  children:[
		  {
		    path: '/adduser',
		    name: 'adduser',
		    component: () => import('../components/zjy/adduser.vue')
		  },
	  ]
	},
	
    // 素材路由
    // {
    //   path: '/materials',
    //   name: 'materials',
    //   component: () => import('../views/materials.vue')
    // },
    // 搜索路由
    // {
    //   path: '/search',
    //   name: 'search',
    //   component: () => import('../views/search.vue')
    // },
    // 上传路由
    // {
    //   path: '/upload',
    //   name: 'upload',
    //   component: () => import('../views/upload.vue')
    // },
    // 用户路由
    // {
    //   path: '/user',
    //   name: 'user',
    //   component: () => import('../views/user.vue')
    // },
    // 登录路由
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue')
    },
    // 注册路由
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/register.vue')
    },
    // 关注路由
		{
			path: '/follow',
			name: 'follow',
			component: () => import('../views/follow.vue')
		},
		// 我个人信息修改路由
		{
			path: '/setting',
			name: 'setting',
			component: () => import('../views/setting.vue')
		},
		// 用户路由
		{
			path: '/user',
			name: 'user',
			component: () => import('../views/user.vue')
		},
		// 素材路由
		{
			path: '/materials',
			name: 'materials',
			component: () => import('../views/materials.vue')
		},
  ]
})

export default router